-- GENERATED SPELL FOR [Ruuan'ok Matriarch] --


function spell0_20211(pUnit, Event) --@Arakkoa Egg,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(35784,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_20211', 1, 1)
end

function spell1_20211(pUnit, Event) --@Impending Doom,n/a--
pUnit:FullCastSpellOnTarget(37579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20211', 30000, 1)
end

function spell2_20211(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20211', 3000, 1)
end

function spell3_20211(pUnit, Event) --@Shadow Mend,Heal--
pUnit:FullCastSpellOnTarget(34110,pUnit)
pUnit:RegisterEvent('Sorts_20211', 2500, 1)
end

function Sorts_20211(pUnit, Event)
local choix_sorts_20211 = math.random(0, 3)
if choix_sorts_20211 == 0 then
pUnit:RegisterEvent('spell0_20211', 1, 1)
end
if choix_sorts_20211 == 1 then
pUnit:RegisterEvent('spell1_20211', 1, 1)
end
if choix_sorts_20211 == 2 then
pUnit:RegisterEvent('spell2_20211', 1, 1)
end
if choix_sorts_20211 == 3 then
pUnit:RegisterEvent('spell3_20211', 1, 1)
end
end

function mob20211_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20211', math.random(1500, 3000), 1)
end

function mob20211_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20211_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20211_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20211, 1, 'mob20211_Action')
RegisterUnitEvent(20211, 2, 'mob20211_Leave')
RegisterUnitEvent(20211, 3, 'mob20211_Kill')
RegisterUnitEvent(20211, 4, 'mob20211_Die')
